<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ include file="/common/taglib.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.0.1/css/bootstrap-theme.css" rel="stylesheet">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta charset="utf-8"/>
    <title>${(branchName==null||branchName=="")?"":branchName}就业满意度系统</title>
    <meta name="description" content="overview &amp; stats"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
    <jsp:include page="/common/basecss.jsp" flush="true"/>
    <select name="" id="branchId">
        <c:forEach var="branch"   items="${branchList}" >
            <option value="${branch.id}" >${branch.branchname}</option>
        </c:forEach>
    </select>
        <button type="button" class="btn btn-white btn-inverse btn-sm"            id="searchBranchBtn">查询分公司</button>
        <button type="button" class="btn btn-white btn-inverse btn-sm"
                id="ToAllViewBtn">查询总体数据</button>


    <style>
    </style>

</head>
<body class="no-skin">
<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
    <div class="main-content" id="page-wrapper">
        <div class="page-content" id="page-content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="input-group col-xs-4">
                        <input class="form-control date-picker" id="datepicker"/>
                        <span class="input-group-addon">
                            <i class="fa fa-calendar bigger-110"></i>
                        </span>
                    </div>
                    <table class="table table-striped table-bordered table-hover center">
                        <tr>
                            <th colspan="11" class="center"><h2>
                                ${(branchName1==null||branchName1=="")?"":branchName1}   ${(month==null||month=="")?"本":month}月就业满意度得分汇总</h2>
                            </th>
                        </tr>
                        <tr>
                            <td rowspan="2"><h4>班级名称</h4></td>
                            <td rowspan="2"><h4>评价时间</h4></td>
                            <td rowspan="2"><h4>评价人数</h4></td>
                            <%--<td rowspan="2"><h5>总分（平均）</h5></td>--%>
                            <td rowspan="2"><h4>班级平均分</h4></td>
                            <td colspan="3">分项平均分</td>
                            <td rowspan="2"><h4>操作</h4></td>

                        </tr>
                        <tr>
                            <td>职业仪表</td>
                            <td>教学态度</td>
                            <td>教学效果</td>

                        </tr>
                        <c:forEach items="${r2list}" var="suggest">
                            <tr>
                                <td>${suggest.cname}</td>
                                <td>${suggest.time}</td>
                                <td>${suggest.numbersum}</td>
                                <%--<td>${score.evaSumScore}</td>--%>
                                <td>
                                    <fmt:formatNumber type="number" value="${suggest.avgClass}"
                                                      pattern="0.00" maxFractionDigits="2"/>
                                </td>
                                <td>
                                    <fmt:formatNumber type="number" value="${suggest.avgappearance}"
                                                      pattern="0.00" maxFractionDigits="2"/></td>

                                <td>
                                    <fmt:formatNumber type="number" value="${suggest.avgjxManner}"
                                                      pattern="0.00" maxFractionDigits="2"/></td>
                                <td>
                                    <fmt:formatNumber type="number" value="${suggest.avgjxResult}"
                                                      pattern="0.00" maxFractionDigits="2"/></td>
                                <td>

                                    <button type="button" class="btn btn-white btn-inverse btn-sm"
                                            onclick="ToSuggestView('${suggest.classId}','${suggest.time}','${suggest.branchId}');">查看建议</button>
                                </td>
                            </tr>
                        </c:forEach>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<jsp:include page="/common/basejs.jsp" flush="true"/>

<script type="text/javascript">
$(function () {
    var $datepicker = $("#datepicker");

    $datepicker.datepicker({
        language: "zh-CN",
        clearBtn: true,//清除按钮
        format: 'yyyy-mm',
        autoclose: true,
        todayBtn: true,
        startView: 3,
        maxViewMode: 1,
        minViewMode: 1
    });

    $("#searchBranchBtn").click(function () {
        var branchId = $("#branchId").val();

        location.href="getR2List.go?branchId=" + branchId+"&month=" +$datepicker.val();
    });
    $("#ToAllViewBtn").click(function () {
        location.href="getAllR2List.go?month="+$datepicker.val();
    })
});



function ToSuggestView(cid,month,branchId){

	layer.open({
        title: '查看建议',
        type: 2,
        area: [
            '600px',
            '430px'],
        fix: false, //不固定
        maxmin: true,
        shadeClose:true,
        
        content:'getR2Suggest.go?classId='+cid+'&month='+month+'&branchId='+branchId
        		});
}


</script>

</body>
</html>
